<?php
   header("content-type:text/html;charset=utf8");
   $conn=new Mysqli("localhost","root","root","db_bailian");
   Mysqli_set_charset($conn,'utf8');
   if($conn->connect_errno){
       die("数据库连接失败！");
   };
   $username=$_POST["username"];
   $password=$_POST["password"];
   
   $sql="select * from t_user where username='{$username}'";
//    $sql="select * from t_user where username='caicai'";
   $res=$conn->query($sql);
   if(Mysqli_num_rows($res)==0){
    echo false;
   }else{
    $row=Mysqli_fetch_assoc($res);
    if($row["password"]===$password){
        echo true;
    }else{
        echo false;
    }
   }
?>